import request from "@/utils/request"

/**
 * 获取公司岗位集合
 * @type {AxiosPromise}
 */
export const reqGetGreatPostList = () => request({url: `/student/getGreatPostList`, method: "get"})
/**
 * 分页查询学生
 * @param current
 * @param limit
 * @param greatStudent
 * @returns {AxiosPromise}
 */
export const reqStudentPage = (current, limit, greatStudent) => request({
  url: `/student/studentPage/${current}/${limit}`,
  method: 'post',
  data: greatStudent
})

/**
 * 根据id删除学生
 * @param greatStuid
 * @returns {AxiosPromise}
 */
export const reqDeleteStudent = (greatStuid) => request({url: `/student/${greatStuid}`, method: 'delete'})
/**
 * 根据id查询学生
 * @param id
 * @returns {AxiosPromise}
 */
export const reqGetStudentById = (id) => request({url: `/student/getStudentById/${id}`, method: 'get'})
/**
 * 添加学生
 * @param student
 * @returns {AxiosPromise}
 */
export const reqSaveStudent = (student) => request({url: `/student/addStudent`, method: 'POST', data: student})
/**
 * 编辑学生
 * @param student
 * @returns {AxiosPromise}
 */
export const reqEditStudent = (student) => request({url: `/student/editStudent`, method: 'post', data: student})
/**
 * 批量删除学生
 * @param ids
 * @returns {AxiosPromise}
 */
export const reqRemoveStudents = (ids) => request({url: `/student/removeStudents`, method: 'post', data: ids})

export const reqExportData = (ids) => request({url: `/student/export`, method:'post',data: ids,responseType: 'blob'})
